/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package colortest;

import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import javax.swing.JFrame;

/**
 *
 * @author Nhat Lam
 */
public class frame extends JFrame implements KeyListener{
    public frame(){
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setBounds(300, 100, 600, 600);
        setAlwaysOnTop(true);
        panel p = new panel();
        setContentPane(p);
        addKeyListener(this);
    }

    @Override
    public void keyTyped(KeyEvent ke) {
        
    }

    @Override
    public void keyPressed(KeyEvent ke) {
        if(ke.getKeyCode() == KeyEvent.VK_ESCAPE);
            System.exit(0);
    }

    @Override
    public void keyReleased(KeyEvent ke) {
        
    }
        
    
}
